3.560 \(\int \frac{A+B x^2}{\sqrt{a+b x^2}} \, dx\)

Optimal. Leaf size=58 \[ \frac{(2 A b-a B) \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 b^{3/2}}+\frac{B x \sqrt{a+b x^2}}{2 b} \]

[Out]

(B*x*Sqrt[a + b*x^2])/(2*b) + ((2*A*b - a*B)*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]
])/(2*b^(3/2))

_______________________________________________________________________________________

Rubi [A]  time = 0.055447, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158 \[ \frac{(2 A b-a B) \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 b^{3/2}}+\frac{B x \sqrt{a+b x^2}}{2 b} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x^2)/Sqrt[a + b*x^2],x]

[Out]

(B*x*Sqrt[a + b*x^2])/(2*b) + ((2*A*b - a*B)*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]
])/(2*b^(3/2))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 8.05785, size = 49, normalized size = 0.84 \[ \frac{B x \sqrt{a + b x^{2}}}{2 b} + \frac{\left (2 A b - B a\right ) \operatorname{atanh}{\left (\frac{\sqrt{b} x}{\sqrt{a + b x^{2}}} \right )}}{2 b^{\frac{3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x**2+A)/(b*x**2+a)**(1/2),x)

[Out]

B*x*sqrt(a + b*x**2)/(2*b) + (2*A*b - B*a)*atanh(sqrt(b)*x/sqrt(a + b*x**2))/(2*
b**(3/2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0404801, size = 61, normalized size = 1.05 \[ \frac{(2 A b-a B) \log \left (\sqrt{b} \sqrt{a+b x^2}+b x\right )}{2 b^{3/2}}+\frac{B x \sqrt{a+b x^2}}{2 b} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x^2)/Sqrt[a + b*x^2],x]

[Out]

(B*x*Sqrt[a + b*x^2])/(2*b) + ((2*A*b - a*B)*Log[b*x + Sqrt[b]*Sqrt[a + b*x^2]])
/(2*b^(3/2))

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 62, normalized size = 1.1 \[{A\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}}+{\frac{Bx}{2\,b}\sqrt{b{x}^{2}+a}}-{\frac{Ba}{2}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){b}^{-{\frac{3}{2}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x^2+A)/(b*x^2+a)^(1/2),x)

[Out]

A*ln(x*b^(1/2)+(b*x^2+a)^(1/2))/b^(1/2)+1/2*B*x*(b*x^2+a)^(1/2)/b-1/2*B*a/b^(3/2
)*ln(x*b^(1/2)+(b*x^2+a)^(1/2))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/sqrt(b*x^2 + a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.235402, size = 1, normalized size = 0.02 \[ \left [\frac{2 \, \sqrt{b x^{2} + a} B \sqrt{b} x -{\left (B a - 2 \, A b\right )} \log \left (-2 \, \sqrt{b x^{2} + a} b x -{\left (2 \, b x^{2} + a\right )} \sqrt{b}\right )}{4 \, b^{\frac{3}{2}}}, \frac{\sqrt{b x^{2} + a} B \sqrt{-b} x -{\left (B a - 2 \, A b\right )} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right )}{2 \, \sqrt{-b} b}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/sqrt(b*x^2 + a),x, algorithm="fricas")

[Out]

[1/4*(2*sqrt(b*x^2 + a)*B*sqrt(b)*x - (B*a - 2*A*b)*log(-2*sqrt(b*x^2 + a)*b*x -
 (2*b*x^2 + a)*sqrt(b)))/b^(3/2), 1/2*(sqrt(b*x^2 + a)*B*sqrt(-b)*x - (B*a - 2*A
*b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)))/(sqrt(-b)*b)]

_______________________________________________________________________________________

Sympy [A]  time = 8.33778, size = 126, normalized size = 2.17 \[ A \left (\begin{cases} \frac{\sqrt{- \frac{a}{b}} \operatorname{asin}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b < 0 \\\frac{\sqrt{\frac{a}{b}} \operatorname{asinh}{\left (x \sqrt{\frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b > 0 \\\frac{\sqrt{- \frac{a}{b}} \operatorname{acosh}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{- a}} & \text{for}\: b > 0 \wedge a < 0 \end{cases}\right ) + \frac{B \sqrt{a} x \sqrt{1 + \frac{b x^{2}}{a}}}{2 b} - \frac{B a \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{2 b^{\frac{3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x**2+A)/(b*x**2+a)**(1/2),x)

[Out]

A*Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a))/sqrt(a), (a > 0) & (b < 0)), (sqrt(a/
b)*asinh(x*sqrt(b/a))/sqrt(a), (a > 0) & (b > 0)), (sqrt(-a/b)*acosh(x*sqrt(-b/a
))/sqrt(-a), (b > 0) & (a < 0))) + B*sqrt(a)*x*sqrt(1 + b*x**2/a)/(2*b) - B*a*as
inh(sqrt(b)*x/sqrt(a))/(2*b**(3/2))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.237252, size = 65, normalized size = 1.12 \[ \frac{\sqrt{b x^{2} + a} B x}{2 \, b} + \frac{{\left (B a - 2 \, A b\right )}{\rm ln}\left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right )}{2 \, b^{\frac{3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/sqrt(b*x^2 + a),x, algorithm="giac")

[Out]

1/2*sqrt(b*x^2 + a)*B*x/b + 1/2*(B*a - 2*A*b)*ln(abs(-sqrt(b)*x + sqrt(b*x^2 + a
)))/b^(3/2)